/*
 * Copyright (c) 2012, Freescale Semiconductor, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */

#ifndef __GST_GL_VIVANTE_H__
#define __GST_GL_VIVANTE_H__

#include "gstgldisplay.h"
#include <GLES2/gl2.h>

G_BEGIN_DECLS

gpointer gst_gl_vivante_new();
void gst_gl_vivante_delete(gpointer gpu);

gboolean gst_gl_vivante_check_format(gpointer gpu, GstVideoFormat format, gint width, gint height);
GLenum gst_gl_vivante_get_gl_format(gpointer gpu, GstVideoFormat format);

gboolean gst_gl_vivante_tex_upload (gpointer gpu, GstGLDisplay * display);
void gst_gl_vivante_set_caps (gpointer gpu, GstCaps * caps);

void gst_gl_vivante_get_sampler_rect (gpointer gpu, gfloat *left, gfloat *right, gfloat *top, gfloat *bottom);

G_END_DECLS

#endif /* __GST_GL_VIVANTE_H__ */
